XGen Interactive Groom SplineΒΆ
Guerilla Render can render the XGen IGS procedural geometries.
Installation
Linux
Make sure the MAYA_PATH/lib and the MAYA_PATH/plug-ins/xgen/lib are present in the LD_LIBRARY_PATH before running "guerilla".
Baking XGen IGS caches in Maya
import maya.cmds as cmds
import maya.mel as mel
# Where to write the descriptions
output_directory = "/tmp/igs"
# The frame range to bake
start_frame = 1
end_frame = 1
# The motion blur substeps
substeps = [ -0.2, 0, 0.2 ]
selection = cmds.ls(sl=1,sn=True)
for frame in range(start_frame,end_frame+1):
print ('Baking frame '+str (frame))
for substep in substeps:
current_time = frame + substep
print (' ... ' + str (current_time))
cmds.currentTime (current_time)
for shape in selection:
# The following command writes the splines data to a file
mel.eval ('xgmExportSplineDataInternal -output "'+output_directory+'/'+shape+'_'+str (current_time)+'.xgs" '+shape+'.outRenderData;')
This procedure bakes all selected XGen Spline Descriptions (note: select shapes, not transforms) into a single file, for each frame as defined by start_frame and end_frame (included) and for each motion substep.
The resulting files are located in the output_directory, name shapeName_time.xgs.
Loading XGen IGS in Guerilla as an Archive
- Click the Create Reference item from the Create menu.
- Select the XGen Spline description (this expects the .xgs file extension).
- If your XGen Spline description is animated, replace the time item in the reference file name with a '#' character.
- First create a XGenSpline procedural node using the Create menu.
- Set the
Files to point to your exported caches files using %g for the time. - Setup the motion time steps as they were set when baking.
- Disable the Attributes > SceneGraph > Load On Demand flag to prevent Bounding Boxes from culling the actual geometry.